﻿<!DOCTYPE html>
<html>

	<head>

		<!--<meta charset="utf-8">-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title>吐槽大会 | 注册</title>

		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
		<!-- <link rel="shortcut icon" href="favicon.ico"> -->

		<link href="css/animate.css" rel="stylesheet">
		<link href="css/style.css" rel="stylesheet">

	</head>
	<style type="text/css">
		.iphone {
			background: #B0A7A2;
			width: 50%;
			float: left;
			color: #fff;
			position: absolute;
			overflow: hidden;
			left: 0px;
			padding: 15px 0;
			bottom: 0px;
			border-radius: 0 0 0 10px
		}
		
		.iphone :hover {}
		
		.andrion {
			background: #B0A7A2;
			padding: 15px 0;
			width: 50%;
			float: left;
			color: #fff;
			position: absolute;
			overflow: hidden;
			right: 0px;
			bottom: 0px;
			border-radius: 0 0 10px 0
		}
		
		.yin {
			background-image: url(./img/tk.png);
		}
	</style>

	<body onkeydown="keyLogin();" style="background-image: url(./img/background.png);background-size:100% 100%;height:100%;overflow-y: hidden;">

		<div class="middle-box text-center loginscreen animated fadeInDown">
			<div style="background:#FDFDFD;padding:10px 30px;border-radius: 10px;overflow: hidden;">
				<div class="form-group" style="padding: 0 0">
					<input style="border-radius: 50px" name="phone" class="form-control" placeholder="请输入手机号">
				</div>

				<div class="form-group" style="padding: 0 0">
					<input style="border-radius: 50px" name="adminName" class="form-control" placeholder="请输入姓名">
				</div>
				<div class="form-group" style="padding: 0 0;position:relative;">
					<input style="border-radius: 50px" name="adminPass" type="password" class="form-control" placeholder="请输入密码" maxlength="30">
				</div>

				<!-- <a href="index.html"> -->
				<button id="loginone" onclick="login()" class="btn btn-primary block full-width m-b" style="border-radius: 50px">注册</button>
				<!-- </a> -->
				<!-- <p style="line-height: 50px;height: 100px"><small>没有账号?</small> <a href="#"><small>免费注册</small></a></p> -->
				<div>
				</div>
			</div>
		</div>

		<!-- Mainly scripts -->
		<script src="js/jquery-3.1.1.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script src="js/other.js"></script>
		<script type="text/javascript">
			function keyLogin() {
				if(event.keyCode == 13) //回车键的键值为13 
					document.getElementById("loginone").click(); //调用登录按钮的登录事件 
			}

			function login() {
				var phone = $('input[name=phone]').val();
				var adminName = $('input[name=adminName]').val();
				var adminPass = $('input[name=adminPass]').val();
				$.ajax({
					url: httpUrl + 'register',
					data: '{adminName:"' + adminName + '",adminPass:"' + adminPass + '",phone:"' + phone + '"}',
					contentType: 'application/json;charset=utf-8',
					dataType: 'json',
					type: 'post',
					success: function(res) {
						alert(res.message)
						if(res.code == 200 && res.state == 0) {
							location.href = "login.html";
						} 
					}
				})
				// return false;

			}
		</script>

	</body>

</html>